package com.sasac.test.api;

import com.sasac.common.core.constant.ServiceNameConstants;
import com.sasac.common.core.domain.R;
import com.sasac.test.api.factory.RemoteTestFallbackFactory;
import com.sasac.test.api.model.TestDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * r
 * 用户服务
 *
 * @author sasac
 */
@FeignClient(contextId = "remoteTestService", value = ServiceNameConstants.TEST_SERVICE, fallbackFactory = RemoteTestFallbackFactory.class)
public interface RemoteTestService {
    /**
     * @param name 用户名
     * @return 结果
     */
    @GetMapping(value = "/api/my/test")
    public R<TestDTO> getTestInfo(@RequestParam("name") String name);
}
